package com.dmy.vo.helper;

import com.dmy.vo.FriendListVo;

import java.util.List;
import java.util.Map;

/**
 * create by huahuadelei for 2020/1/12
 */
public class FriendListGroupHelper implements FriendListGroupHandler {
    private  FriendListGroupHandler handler;

    public FriendListGroupHelper(GroupType type) {
        switch (type){
            case JAVA8_GROUP:
                this.handler = new JAVA8GroupHandler();
                break;
            case ZIDINGYI_GROUP:
                this.handler = new ZDYGroupHandler();
                break;
        }

    }

    @Override
    public void push(FriendListVo friendListVo) {
        handler.push(friendListVo);
    }

    @Override
    public Map<String, List<FriendListVo>> groupResult() {
        return handler.groupResult();
    }
}
